package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import com.example.demo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public Integer addUserInfo(UserInfo userInfo) {
        return userMapper.addUserInfo(userInfo);
    }

    public Integer selectUserCount(String username) {
        return userMapper.selectUserCount(username);
    }

    public UserInfo selectUserInfoByUsername(String username) {
        return userMapper.selectUserInfoByUsername(username);
    }

    public UserInfo getUserInfoById(Integer id) {
        return userMapper.getUserInfoById(id);
    }

}
